<template>
    <div>
        <Modal v-model="modal.search" title="高级搜索" width="1020">
            <Form ref="searchForm" :model="searchForm" :label-width="120">
                <Row>
	<i-col span="12">
	<FormItem label="订单编号"><Row>
	<i-col span="11">
	<FormItem prop="idMin">
	<InputNumber v-model="searchForm.idMin" placeholder="请输入开始订单编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="idMax">
	<InputNumber v-model="searchForm.idMax" placeholder="请输入结束订单编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="店铺编号"><Row>
	<i-col span="11">
	<FormItem prop="shopIdMin">
	<InputNumber v-model="searchForm.shopIdMin" placeholder="请输入开始店铺编号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="shopIdMax">
	<InputNumber v-model="searchForm.shopIdMax" placeholder="请输入结束店铺编号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="收货人" prop="realName" label-for="realName">
	<Input v-model="searchForm.realName" element-id="realName" placeholder="请输入收货人" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="手机号" prop="phone" label-for="phone">
	<Input v-model="searchForm.phone" element-id="phone" placeholder="请输入手机号" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="省" prop="province" label-for="province">
	<Input v-model="searchForm.province" element-id="province" placeholder="请输入省" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="市" prop="city" label-for="city">
	<Input v-model="searchForm.city" element-id="city" placeholder="请输入市" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="区/县" prop="district" label-for="district">
	<Input v-model="searchForm.district" element-id="district" placeholder="请输入区/县" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="地址别名" prop="addressAlias" label-for="addressAlias">
	<Input v-model="searchForm.addressAlias" element-id="addressAlias" placeholder="请输入地址别名" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="详细地址" prop="address" label-for="address">
	<Input v-model="searchForm.address" element-id="address" placeholder="请输入详细地址" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="门牌号" prop="area" label-for="area">
	<Input v-model="searchForm.area" element-id="area" placeholder="请输入门牌号" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="是否已发货" prop="isDeliver">
	    
	        <Select v-model="searchForm.isDeliver" placeholder="请选择是否已发货" filterable clearable>
	          <Option
	            v-for="(option, index) in isDeliverSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col><i-col span="12">
	<FormItem label="收货方式" prop="deliverType" label-for="deliverType">
	<Input v-model="searchForm.deliverType" element-id="deliverType" placeholder="请输入收货方式" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="物流公司名称" prop="logisticsCompany" label-for="logisticsCompany">
	<Input v-model="searchForm.logisticsCompany" element-id="logisticsCompany" placeholder="请输入物流公司名称" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="物流公司编码" prop="logisticsCode" label-for="logisticsCode">
	<Input v-model="searchForm.logisticsCode" element-id="logisticsCode" placeholder="请输入物流公司编码" clearable/>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="物流单号" prop="logisticsNo" label-for="logisticsNo">
	<Input v-model="searchForm.logisticsNo" element-id="logisticsNo" placeholder="请输入物流单号" clearable/>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="版本号"><Row>
	<i-col span="11">
	<FormItem prop="versionMin">
	<InputNumber v-model="searchForm.versionMin" placeholder="请输入开始版本号" style="width: 100%;"/>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="versionMax">
	<InputNumber v-model="searchForm.versionMax" placeholder="请输入结束版本号" style="width: 100%;"/>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="创建时间"><Row>
	<i-col span="11">
	<FormItem prop="createTimeMin">
	<DatePicker @on-change="searchForm.createTimeMin=$event" :value="searchForm.createTimeMin" placeholder="请输入开始创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="createTimeMax">
	<DatePicker @on-change="searchForm.createTimeMax=$event" :value="searchForm.createTimeMax" placeholder="请输入结束创建时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col><i-col span="12">
	<FormItem label="更新时间"><Row>
	<i-col span="11">
	<FormItem prop="updateTimeMin">
	<DatePicker @on-change="searchForm.updateTimeMin=$event" :value="searchForm.updateTimeMin" placeholder="请输入开始更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
	<i-col span="2" style="text-align: center">-</i-col>
	<i-col span="11">
	<FormItem prop="updateTimeMax">
	<DatePicker @on-change="searchForm.updateTimeMax=$event" :value="searchForm.updateTimeMax" placeholder="请输入结束更新时间" type="datetime" format="yyyy-MM-dd HH:mm:ss" style="width: 100%;" clearable></DatePicker>
</FormItem>
</i-col>
</Row>
</FormItem>
</i-col>

	<i-col span="12">
	<FormItem label="是否激活" prop="isActive">
	    
	        <Select v-model="searchForm.isActive" placeholder="是否激活" filterable clearable>
	          <Option
	            v-for="(option, index) in isActiveSelect"
	            :value="option.value"
	            :key="index"
	          >{{option.displayValue}}</Option>
	        </Select>
	    
	</FormItem>
</i-col>
</Row>

            </Form>
            <div slot="footer">
                <Button type="text" size="large" @click="resetForm">清空</Button>
                <Button type="text" size="large" @click="cancelModal">取消</Button>
                <Button type="primary" size="large" @click="searchOkModal" :loading="loading.search">查询</Button>
            </div>
        </Modal>
    </div>
</template>

<script>
    import * as utils from '@/api/utils-v2'
    import * as ResponseStatus from '@/api/response-status'
    export default {
        name: 'GoodsOrderLogisticsSearch',
        data() {
            return {
                modal: {
                    search: false
                },
                loading: {
                    search: false
                },
                urls: {
                    searchUrl: '/goods-order-logistics/admin/pager-cond'
                },
				dataDictCodes: ['IS_ACTIVE','GOODS_IS_DELIVERY'],
				dataDictItems: {},
				isActiveSelect:[],
				isDeliverSelect:[],
                searchForm: {
                    pageNo: 1,
                    pageSize: 10,
                    sortColumn: null,
                    sortOrder: null,
                    id: null,
idMin: null, 
idMax: null, 
shopId: null,
shopIdMin: null, 
shopIdMax: null, 
realName: null,
phone: null,
province: null,
city: null,
district: null,
addressAlias: null,
address: null,
area: null,
isDeliver: null,
isDeliverMin: null, 
isDeliverMax: null, 
deliverType: null,
logisticsCompany: null,
logisticsCode: null,
logisticsNo: null,
version: null,
versionMin: null, 
versionMax: null, 
createTime: null,
createTimeMin: null, 
createTimeMax: null, 
updateTime: null,
updateTimeMin: null, 
updateTimeMax: null, 
isActive: null,
isActiveMin: null, 
isActiveMax: null, 

                },
            }
        },
        computed: {},
        mounted() {
			            utils.getDataDict(this.dataDictCodes).then(response => {
			              if (response) {
			                this.dataDictItems = response
			                utils.getSelectDictItems(this, 'IS_ACTIVE', 'isActive', 'isActiveSelect')
							utils.getSelectDictItems(this, 'GOODS_IS_DELIVERY', 'isDeliver', 'isDeliverSelect')
			              }
			            }).catch(error => {
			              console.log(error)
			            })
		},
        methods: {
            resetForm() {
                this.$refs.searchForm.resetFields()
            },
            cancelModal(modal) {
                this.modal.search = false
            },
            searchOkModal(modal) {
                this.modal.search = false
                this.$emit('searchTable', true)
            }
        }
    }
</script>

<style>
</style>
